package org.misty.seckill.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.misty.seckill.model.Order;
import org.misty.seckill.model.SOrder;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface OrderDao {
  @Deprecated
  SOrder findByUserAndGoods(@Param("userId") long userId, @Param("goodsId") long goodsId);

  int insertOrder(Order order);

  int insertSOrder(SOrder sOrder);

  Order findByUserAndId(@Param("userId") long userId, @Param("orderId") long orderId);

  int clearOrders();

  int clearSOrders();
}
